{extend name="base" /}
{block name="content"}
<div class="m-b-md">
    <h2 class="m-b-none">分类编辑</h2>
</div>
<form class="form-horizontal" id="form" action="" method="post">
    <div class="panel panel-default">
        <div class="panel-body">
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">分类名称</label>
                <div class="col-sm-9">
                    <input type="text" name="cname" value="{$oldData['cname']}">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">排序</label>
                <div class="col-sm-9">
                    <input type="text" name="csort" value="{$oldData['csort']}">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">所属分类</label>
                <div class="col-sm-3">
                    <select class="form-control" name="pid" readonly>
                        <option value="0">顶级分类</option>
                        {foreach name="cateData" item="v"}
                        <option value="{$v['cid']}" {if condition="$v['cid']==$oldData['pid']"}selected{/if}>{$v['_cname']}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">所属类型</label>
                <div class="col-sm-3">
                    <select class="form-control" name="shop_type_tid" readonly>
                        <option value="0">顶级分类</option>
                        {foreach name="type" item="v"}
                        <option value="{$v['tid']}" {if condition="$v['tid']==$oldData['shop_type_tid']"}selected{/if}>{$v['tname']}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
        </div>
    </div>
    <button class="btn btn-primary" type="submit">确定提交</button>
</form>
</div>
{/block}